package string;

/**
 * @author Huangjin
 * @version 1.0
 * describe:boolean startsWith(String s):
 *  判断当前字符串是否以给定的字符串（s）开始的
 *boolean endsWith(String s):
 * 判断当前字符串是否是以给定的字符串（s）结束的
 * @date 2023/2/28 11:54
 */
public class StartsWithDemo {
    public static void main(String[] args) {
        //java编程思想
        String str = "think in java";
        boolean starts = str.startsWith("think");
        System.out.println(starts);
        boolean ends = str.endsWith(".png");
        System.out.println(ends);
    }
}
